using System;
using System.Collections.Generic;
using System.Text;

namespace Marlimer.Common.EntidadesQuery
{
    public class InfoProductoBus
    {
        public int ccod_prod;
        public String cdes_prod;
        public double npre_vtacon;
        public double npre_vtacre;
        public double npre_vtamin;
        public String cstatus;
        public int ccod_unimed;
        public String cnom_unimed;

        //private List<object> arrElements = new List <object>();

        public InfoProductoBus()
        {
            /*arrElements.Add(ccod_prod);
            arrElements.Add(cdes_prod);
            arrElements.Add(npre_vtacon);
            arrElements.Add(npre_vtacre);
            arrElements.Add(cstatus);
             * */
        }

        public object getElement(int index)
        {
            object resul=null;
            switch (index)
            {
                case 0: { resul = ccod_prod; break;}
                case 1: { resul = cdes_prod; break; }
                case 2: { resul = npre_vtacon; break; }
                case 3: { resul = npre_vtacre; break; }
                case 4: { resul = npre_vtamin; break; }
                case 5: { resul = cstatus; break; }
                case 6: { resul = ccod_unimed; break; }
                case 7: { resul = cnom_unimed; break; }
            }
            return resul;
        }

        public void setElement(int index, object value)
        {
            switch (index)
            {
                case 0: { ccod_prod = Convert.ToInt32(value); break;}
                case 1: { cdes_prod = Convert.ToString(value); break; }
                case 2: { npre_vtacon = Convert.ToDouble(value); break; }
                case 3: { npre_vtacre = Convert.ToDouble(value); break; }
                case 4: { npre_vtamin = Convert.ToDouble(value); break; }
                case 5: { cstatus = Convert.ToString(value); break; }
                case 6: { ccod_unimed = Convert.ToInt32(value); break; }
                case 7: { cnom_unimed = Convert.ToString(value); break; }
            }
        }
    }
}
